package com.system.consultationroom.feign;

import com.system.consultationroom.bean.Depart;
import com.system.consultationroom.vo.DepartItemVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @className: DeptServiceFeign
 * @description: TODO 类描述
 * @author: Kuangkeli
 * @date: 2023/12/11 14:45
 **/
@FeignClient(value = "depart-service", path = "/depart")
public interface DeptServiceFeign {

    @PostMapping("/save")
    boolean saveHandle(@RequestBody Depart depart);

    @DeleteMapping("/del/{id}")
    boolean deleteHandle(@PathVariable("id") int id);

    @PutMapping("/upd")
    boolean updateHandle(@RequestBody Depart depart);

    @GetMapping("/get/{id}")
    Depart getHandle(@PathVariable("id") int id);

    @GetMapping("/get/list")
    List<Depart> listHandle();

    @GetMapping("/getAllParent/list")
    List<Depart> listParentHandle();

    @GetMapping("/getChild/{id}")
    List<Depart> listChildHandle(@PathVariable("id") int id);

    @GetMapping("/getDepartName/{id}")
    String getDepartName(@PathVariable("id") int id);

    @GetMapping("/get/departItemVOlist")
    List<DepartItemVO> getDepartItemVOList();
}
